package com.hpf.springcloud.service;

import com.hpf.commons.pojo.Payment;
import com.hpf.commons.utils.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @description:
 * @datetime: 2020/10/2 13:28
 * @author: huangpengfei
 */
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface PaymentFeignService {

    /**
     *  根据id获取
     * @param id:
     * @return com.hpf.commons.utils.CommonResult<com.hpf.commons.pojo.Payment>
     * @author  huangpengfei
     * @datetime  2020/10/2 13:29
     */
    @GetMapping(value = "/payment/get/{id}")
    CommonResult<Payment> getPaymentById(@PathVariable("id") Long id);

    @GetMapping(value = "/payment/feign/timeout")
    String feignTimeout();
}
